package pl.edu.agh.jemo.evolution.selections.impl;

import javax.swing.JPanel;

import pl.edu.agh.jemo.evolution.population.Population;
import pl.edu.agh.jemo.evolution.selections.Tournament;

/**
 * This selection implementation doesn't affect given population. It has been added, to allow genetic algorithms without performing tournament.
 * Only this class guarantees, that no specimen will be excluded from population.
 * 
 * 
 * @author Marcin Zbijowski
 *
 */
public class EmptyTournament extends Tournament {

	/**
	 * Does nothing.
	 * Empty tournament should not modify given population in any way. It is used when selection operator has been switched off.
	 */
	@Override
	public void performTournament(Population competitors) {
	}

	/**
	 * Returns configuration panel being extension of JPanel instance.
	 * Returned panel is displayed by graphical user interface allowing user to confgiure tournament.
	 * This method may return null if no configuration for operator is possible.
	 * 
	 * @return Null pointer, as no configuration is needed for this tournament.
	 */
	@Override
	public JPanel getConfigPanel() {
		return null;
	}

}
